package com.elink.enginerring.common;

import com.elink.enginerring.co.BaseCo;


/**
 * 分页Bean
 * @author Admin
 *
 */
public class Pagination {
	private int pageNo; // 当前页
	private int pageSize; // 每页记录条数
	private int totalCount; // 总条数

	public Pagination() {
	}

	public Pagination(int pageNo, int pageSize, int totalCount) {
		super();
		this.pageNo = pageNo;
		this.pageSize = pageSize;
		this.totalCount = totalCount;
	}

	public Pagination(BaseCo co, long totalCount) {
		this.pageNo = co.getPageNo();
		this.pageSize = co.getPageSize();
		this.totalCount = (int) totalCount;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getPageNo() {
		return pageNo;
	}

	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
	}

	public int getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}

	public int getStart() {
		return (pageNo - 1) * pageSize;
	}
}
